﻿using System;
using Autodesk.Revit.DB;

namespace FetchDataCompare
{
	public class GeoObjectBase
	{
		public FetchDataRectangle BoundingRect { get; set; }

		public EGeoObjectType GeoObjType { get; set; }

		public GeoObjectBase()
		{
			this.BoundingRect = new FetchDataRectangle();
		}

		public virtual void InitDataByElement(Element inputElement)
		{
		}

		public override int GetHashCode()
		{
			return (int)this.GeoObjType;
		}

		public override bool Equals(object obj)
		{
			GeoObjectBase geoObjectBase = obj as GeoObjectBase;
			return geoObjectBase != null && this.BoundingRect.Equals(geoObjectBase.BoundingRect);
		}
	}
}
